home *** CD-ROM | disk | FTP | other *** search
- package symantec.itools.db.net;
-
- import java.awt.Frame;
- import java.net.InetAddress;
- import java.net.UnknownHostException;
- import java.util.Vector;
- import symjava.sql.SQLException;
-
- public class ClientSession {
- MPlex _mplex;
- // $FF: renamed from: _f java.awt.Frame
- private Frame field_0;
-
- public ClientSession(InetAddress host, int port, String repos, boolean shareSocket) throws NetException {
- this.init(host, port, shareSocket);
- }
-
- public ClientSession(String hostname, int port, String repos, boolean shareSocket) throws UnknownHostException, NetException {
- InetAddress host = InetAddress.getByName(hostname);
- this.init(host, port, shareSocket);
- }
-
- private void init(InetAddress host, int port, boolean shareSocket) throws NetException {
- this.field_0 = new Frame("SCALE errors");
- this._mplex = new MPlex(host, port, shareSocket, this);
- this._mplex.connect();
- }
-
- public void loginPublic(String username, String password) throws SQLException {
- SessionRequest s;
- try {
- s = new SessionRequest(this);
- } catch (Exception var4) {
- throw new SQLException("Login Failure");
- }
-
- s.loginPublic(username, password);
- }
-
- public void loginPrivate(String key, String username, String password) throws SQLException {
- SessionRequest s;
- try {
- s = new SessionRequest(this);
- } catch (Exception var5) {
- throw new SQLException("Login Failure");
- }
-
- s.loginPrivate(key, username, password);
- }
-
- public Vector getRepositoryList() throws SQLException {
- SessionRequest s;
- try {
- s = new SessionRequest(this);
- } catch (Exception var2) {
- throw new SQLException("Login Failure");
- }
-
- return s.getRepositoryList();
- }
-
- void DisplayError(String caption, String error) {
- }
-
- public void close() {
- if (this._mplex != null) {
- this._mplex.disconnect();
- this._mplex.close();
- this._mplex = null;
- }
-
- }
-
- public void finalize() {
- this.close();
- }
-
- void lostConnection() {
- this._mplex = null;
- }
- }
-